package com.wyd.bean;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class CommonConfiguration {

    @Bean
    @LoadBalanced//方法3调用时需要加此注解
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }

}

